package com.mxx.common.flow;

/**
 * @author: mxx
 * @date: 2022/1/4
 * @time: 13:30
 * @Description: 描述信息
 */
public class FlowModuleBuilder {

    private FlowManagerBuilder flowManagerBuilder;
    private FlowModule flowModule;

    protected FlowModuleBuilder(FlowManagerBuilder flowManagerBuilder, FlowModule flowModule) {
        this.flowManagerBuilder = flowManagerBuilder;
        this.flowModule = flowModule;
    }

    public FlowModuleBuilder addMultiple(Class<? extends Flow> classes) {
        this.flowModule.addMultiple(classes);
        return this;
    }

    public <E extends Flow> FlowModuleBuilder addSingle(E e) {
        this.flowModule.addSingle(e);
        return this;
    }

    public FlowManagerBuilder next() {
        return this.flowManagerBuilder;
    }

}
